package cn.com.api.service.impl.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.api.entity.ApiU_coupon;

import cn.com.api.mapper.ApiU_couponMapper;

import cn.com.api.service.ApiU_couponService;

/**
 * 
 **/
@Service
public class U_couponServiceImplBase {
	@Autowired
	private ApiU_couponMapper apiU_couponMapper;
    
    // 根据id获取
	public ApiU_coupon findU_couponById(Integer id){
		ApiU_coupon u_coupon = apiU_couponMapper.findU_couponById( id );
		return u_coupon;
	}
    
    //查看数据集
	public List<ApiU_coupon> findU_coupons(){
        List<ApiU_coupon> u_coupons = apiU_couponMapper.findU_coupons();
		return u_coupons;
    }
   
    //根据条件查看数据集
	public List<Map<String, Object>> findU_couponsByMap(HashMap condition){
        List<Map<String, Object>> u_coupons = apiU_couponMapper.findU_couponsByMap(condition);
		return u_coupons;
    }
    
	// 添加
	public int insertU_coupon(ApiU_coupon u_coupon){
		int ret_I= apiU_couponMapper.insertU_coupon(u_coupon);
		return ret_I;
	}

	// 修改
	public int updateU_coupon(ApiU_coupon u_coupon){
		int ret_I= apiU_couponMapper.updateU_coupon(u_coupon);
		return ret_I;
	}
	
    // 删除
	public int deleteU_coupon(Integer id){
		int ret_I= apiU_couponMapper.deleteU_coupon( id );
		return ret_I;
	}
	
    // Foreign keys revelant		
		

	//region Indexs revelant
    
    
    
    
}


